<?php
// +----------------------------------------------------------------------
// | author: thinkphp
// +----------------------------------------------------------------------

namespace app\common\enum;

/**
 * 项目状态枚举
 * Class ProjectStatusEnum
 * @package app\common\enum
 */
class ProjectEnum
{
    const SEEKING_HELP = 1; // 求助中
    const HELPING = 2; // 帮扶中
    const COMPLETED = 3; // 已完成
    /**
     * @notes 获取禁用状态
     * @param bool $value
     * @return string|string[]
     */
    public static function getStatusDesc($value = true)
    {
        $data = [
            self::SEEKING_HELP => '求助中',
            self::HELPING => '帮扶中',
            self::COMPLETED => '已完成',
        ];
        if ($value === true) {
            return $data;
        }
        return $data[$value] ?? '未知状态';
    }
}